package com.example.keli.base.utils;

import android.content.Context;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.example.keli.R;

/**
 * Description:
 * Data：2019/3/29-14:28
 * Author: Allen
 */
public class ViewUtils {
    public static View getEmptyView(Context context){
        TextView textView = new TextView(context);
        textView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
        textView.setText("暂无数据~");
        textView.setGravity(Gravity.CENTER);
        return textView;
    }
    public static View getFootView(Context context){
        View view = LayoutInflater.from(context).inflate(R.layout.empty_view,null);
        return view;
    }
}
